]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
authPrompt: Don't focus hidden cancelButton
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 19 Feb 2020 16:32:22 +0000 (17:32 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Mon, 24 Feb 2020 12:29:44 +0000 (12:29 +0000)
The button is hidden on the lock screen, so it shouldn't be allowed to
activate it, be it via click or keyboard. The latter is still possible
by keynaving to the button and hitting space/enter. Fix that by making
the button unfocusable when we make it unreactive.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2210

js/gdm/authPrompt.js

index 0cb2462a0ce6f821665671aef8b13b4b278afe12..bab6d5deee795c38f5a8613f5f67e64e824c89fa 100644 (file)
@@ -134,7 +134,7 @@ var AuthPrompt = GObject.registerClass({
             style_class: 'modal-dialog-button button cancel-button',
             button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
             reactive: this._hasCancelButton,
-            can_focus: true,
+            can_focus: this._hasCancelButton,
             x_align: Clutter.ActorAlign.START,
             y_align: Clutter.ActorAlign.CENTER,
             child: new St.Icon({ icon_name: 'go-previous-symbolic' }),
@@ -285,6 +285,7 @@ var AuthPrompt = GObject.registerClass({
         this.setActorInDefaultButtonWell(null);
         this.verificationStatus = AuthPromptStatus.VERIFICATION_SUCCEEDED;
         this.cancelButton.reactive = false;
+        this.cancelButton.can_focus = false;
     }
 
     _onReset() {
@@ -453,6 +454,7 @@ var AuthPrompt = GObject.registerClass({
         let oldStatus = this.verificationStatus;
         this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
         this.cancelButton.reactive = this._hasCancelButton;
+        this.cancelButton.can_focus = this._hasCancelButton;
         this._preemptiveAnswer = null;
 
         if (this._userVerifier)